Imports System.Collections.Generic
Imports System.Text

Namespace Core
	<Record(FieldMapping := FieldMapping.ExplicitColumnsOnly, Width := 32)> _
	Friend NotInheritable Class DbfHeader
		<Column(AdvancedType := AdvancedColumnType.[BYTE])> _
		Public VerNumber As Byte

		<Column(AdvancedType := AdvancedColumnType.DATE_YMD)> _
		Public LastUpdate As DateTime

		<Column(AdvancedType := AdvancedColumnType.Int32)> _
		Public NbRecords As Int32

		<Column(AdvancedType := AdvancedColumnType.UINT16)> _
		Public HeaderWidth As UInt16

		<Column(AdvancedType := AdvancedColumnType.UINT16)> _
		Public RecordWidth As UInt16

		<Column(AdvancedType := AdvancedColumnType.INT16)> _
		Public Zero As Int16

		<Column(AdvancedType := AdvancedColumnType.[BYTE])> _
		Public IncompleteTransaction As Byte

		<Column(AdvancedType := AdvancedColumnType.[BYTE])> _
		Public EncryptionFlag As Byte

		<Column(AdvancedType := AdvancedColumnType.DELAYED, Width := 12)> _
		Public LanOnly As Byte()

		<Column(AdvancedType := AdvancedColumnType.[BYTE])> _
		Public Indexed As Byte
		' MdxFlag

		<Column(AdvancedType := AdvancedColumnType.[BYTE])> _
		Public Language As Byte

		<Column(AdvancedType := AdvancedColumnType.INT16)> _
		Public Zero2 As Int16

		Public Sub Clear()
			VerNumber = 0
			LastUpdate = DateTime.MinValue
			NbRecords = 0
			HeaderWidth = 0
			RecordWidth = 0
			Zero = 0
			IncompleteTransaction = 0
			EncryptionFlag = 0
			LanOnly = New Byte() {}
			Indexed = 0
			Language = 0
			Zero2 = 0
		End Sub
	End Class

End Namespace
